package com.techsoul.module.system.controller;

import com.techsoul.common.core.pojo.Result;
import com.techsoul.module.system.service.IFileService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartHttpServletRequest;

@Api(tags = "文件")
@RestController
@RequestMapping("/system/file")
public class FileController {

    @Autowired
    private Result result;
    
    @Autowired
    private IFileService service;

    @PostMapping("/upload")
    public Result upload(MultipartHttpServletRequest request) {
        return result.success(service.upload(request));
    }

}
